﻿namespace BarrageGameAssistant.Core.Enums
{
    /// <summary>
    /// Ocr识别匹配类型
    /// </summary>
    public enum OcrMatchType
    {
        /// <summary>
        /// 全匹配
        /// </summary>
        All = 0,

        /// <summary>
        /// 仅匹配中文
        /// </summary>
        Chinese,

        /// <summary>
        /// 仅匹配数字
        /// </summary>
        Digit,

        /// <summary>
        /// 仅匹配英文
        /// </summary>
        English
    }

    public static class OcrMatchTypeExtension
    {
        public static string ToDesc(this OcrMatchType ocrMatchType)
        {
            if (ocrMatchType == OcrMatchType.Chinese)
                return "仅匹配中文";
            else if (ocrMatchType == OcrMatchType.Digit)
                return "仅匹配数字";
            else if (ocrMatchType == OcrMatchType.English)
                return "仅匹配英文";
            else
                return "全匹配";
        }
    }
}
